package com.xuexiang.xuidemo.slice.imageview.preview;

import ohos.aafwk.ability.Ability;
import ohos.aafwk.content.Intent;
import ohos.multimodalinput.event.KeyEvent;

import com.xuexiang.xui_lib.util.LogUtils;
import com.xuexiang.xuidemo.slice.imageview.preview.slice.PreviewRecycleViewSlice;

public class PreviewRecycleViewAbility extends Ability {
    @Override
    public void onStart(Intent intent) {
        super.onStart(intent);
        super.setMainRoute(PreviewRecycleViewSlice.class.getName());
    }

    @Override
    public boolean onKeyUp(int keyCode, KeyEvent keyEvent) {
        if (keyCode == KeyEvent.KEY_BACK) {
            LogUtils.error("PreviewRecycleViewAbility","11111");
            terminateAbility();
        }
        return super.onKeyUp(keyCode, keyEvent);
    }
}